package com.x.reader.controller;

import com.x.framework.Base;
import com.x.framework.model.BaseView;
import com.x.reader.model.History;
import com.x.reader.service.HistoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Controller
@RestController
public class HistoryController extends Base {

    @Autowired
    private HistoryService historyService;

    @RequestMapping(value = "/SelectHistoryList")
    public BaseView selectHistoryList(History history) {
        List<History> historyList = historyService.selectHistoryList(history);
        BaseView view = new BaseView(1);
        view.setResult(historyList);
        return view;
    }

}
